import Home from '@/views/Home'
import NotFount from '@/views/NotFount.vue'
import Serch from '@/views/Serch'
import Vue from 'vue'
import VueRouter from 'vue-router'
Vue.use(VueRouter) // VueRouter插件初始化

// 创建了一个路由对象
const router = new VueRouter({
  mode:'history',
  routes: [
    { path:'/',redirect:'/home'},
    { path: '/home', component: Home },
    { path: '/serch/:words?', component: Serch },
    {path:'*', component:NotFount}
  ]
})

export default router